<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig" %>
<!DOCTYPE html>
<html>
<head>
	<%@ include  file="/WEB-INF/oss/base/common/variable.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/resource_lib.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/variable_js.jsp"%>
   <link type="text/css" href="<%=basePath%>/css/oss/base/dictionary.css?<%=v%>" rel="stylesheet"/>
   <script type="text/javascript" src="<%=basePath%>/js/oss/base/dictionary.js?<%=v%>"></script>
</head>
<body>
	<div class="app-container">
		<div class="search-condition" type-option="search_table" config-option=" 'submit':'#searchbtns',
															'table':'#init-table' ">
				<input type-name="p_code" id="parent_key_input" type="hidden"  />

				<input type-name="name" placeholder="Name query" id="sub-name-alias" style="width: 160px;" class="input input-auto" />
				
				<input type-name="dictionary_name" placeholder="Category name query" id="sub_category" style="width: 160px;" class="input input-auto" />
				
				<input type-name="code" id="sub_category" placeholder="CODE inquire" style="width: 160px;" class="input input-auto" />
				
				<select class="input input-auto" type-name="delete_flag" style="width: 150px;">
					<option value="">Please select</option>
					<option value="0">Normal display</option>
					<option value="1">Hidden</option>
				</select>
				<button id="searchbtns" class="button ml-20 bg-sub">inquire</button>
				<button type-option="button" class="button ml-10 bg-sub" config-option="'type':'window','title':'Add data dictionary','selector':'#add-dictionary','width':'260px','before':'beforeFunc' " >Add data dictionary</button>
		</div>
		
		<div id="return_back_div" class="hide mt-10 clearfix">
			<span style="font-weight: 700;"><span>Parent item name:</span><span id="father-dictionary" style="display: inline-block;line-height:30px;"></span></span> 
			<button id="return_back" class="button button-small bg-sub float-right">Return to upper level</button>
		</div>
		
		 <div>
			<div id="init-table" type-option="table" config-option="'url':'/page/dictionary',
						'param':{ 'isOnlyP':1 },
						'columns':[
							{'name':'Serial number','type':'seq','value':'seq','width':'8%'}, 
							{'name':'Name','type':'value','value':'name','width':'10%'}, 
							{'name':'Sort','type':'value','value':'dictionary_name',limit:15,'width':'10%'}, 
							{'name':'CODE','type':'value','value':'code','width':'8%'},
							{'name':'Superclass','type':'value','value':'p_dictionary_name',limit:8,'width':'10%','click_callback':'ssss12','default_value':'-'}, 
							{'name':'Parent CODE','value':'p_code','width':'10%','default_value':'-'}, 
							{'name':'Controls','type':'self','value_callback':'value_function','width':'16%'}]" > 
			
			</div>
		</div> 
	</div>
	
	<div style="display:none;padding:20px;" id="add-dictionary" 
		type-option="form_submit" config-option=" 'url':'/dictionary',
												  'submit':'#add-Btn',
												  'success':'sunccessReturn',
												  'validate':{ 'tigger':'focusout,submit','style':'color,pop'} ">
		<input id="p_code_add"  type-name="p_code" type="hidden" />
		<input id="p_dictionary_name_add" type-name="p_dictionary_name" type="hidden" />
		<div>
			<span>name:  &nbsp;</span> <br>
			<input id="sub-name" validate="empty" type-name="name" class="input input-auto"/>
		</div>
		<div style="margin-top: 10px;">
			<span>Class name:  &nbsp;</span> 
			<input id="sub-category" validate="empty" type-name="dictionary_name" class="input input-auto" />		
		</div>
		<div style="margin-top: 10px;">
			<span>Numerical value:  &nbsp;</span> 
			<input id="sub-category" type-name="value" placeholder="If not, do not fill" class="input input-auto" />		
		</div>
		<div style="margin-top: 10px;">
			<button id="add-Btn" class="button button-small" >Save</button>	
		</div>
	</div>
	
	<div style="display:none;padding:20px;" id ="table-detail-info"  
				type-option="form_submit" config-option=" 'url':'/dictionary',
														  'method':'PUT',
														  'submit':'#update_btn',
														  'success':'sunccessReturn',
														  'validate':{ 'tigger':'focusout,submit','style':'color,pop'}"  >
		<input type-name="id"  type="hidden" />	
		<div>
			<span>name </span>
			<input id="modify_name"  type-name="name"  class="input input-auto" />		
		</div>
		<div style="margin-top: 10px;">
			<span>KEY&nbsp;</span> 
			<input id="modify_key" type-name="dictionary_name" class="input input-auto" />		
		</div>
		<div style="margin-top: 10px;">
			<span>Numerical value</span> 
			<input id="sub-category" type-name="value" class="input input-auto" />		
		</div>
		<div style="margin-top: 10px;">
			<button id="update_btn" class="button button-small" > Renewal </button>		
		</div>
	</div>
</body>
<script type="text/javascript">
	$(function(){
		$(document).delegate(".limiter","click",function(){
			layer.tips($(this).attr("tag") , this, {
				tips: [1, '#4682B4']
			});
		})
	})
</script>
</html>